// 库存管理接口
import request from "@/common/request.js";
const api = {
  shipments_order: "/shipments_order/",
  market_order: "/market_order/",
  client: "/client/",
  product: "/product/",
  offer_order_mrp: "/offer_order_mrp/",
};

const oSalesOutApi = {
  get_shipments_order(params) {
    return request({
      url: api.shipments_order,
      method: "get",
      params,
    });
  },

  get_client(params) {
    return request({
      url: api.client,
      method: "get",
      params,
    });
  },

  get_market_order(params) {
    return request({
      url: api.market_order,
      method: "get",
      params,
    });
  },

  market_order_detail(id) {
    return request({
      url: api.market_order + id,
      method: "get",
    });
  },

  shipments_order_detail(id) {
    return request({
      url: api.shipments_order + id,
      method: "get",
    });
  },

  post_shipments_order(data) {
    return request({
      url: api.shipments_order,
      method: "post",
      data,
    });
  },

  patch_shipments_order(data, id) {
    return request({
      url: api.shipments_order + id + "/",
      method: "patch",
      data,
    });
  },

  delete_shipments_order(id) {
    return request({
      url: api.shipments_order + id + "/",
      method: "delete",
    });
  },
};

export default oSalesOutApi